<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="bb" class="weaver.general.BaseBean"/>
<%
    /*
     *@Description: 获取是否采购标书
     *@Param: [request, response]
     *@return: void
     *@Author: Dusongsong
     *@Date: 2021/1/14
     */
    String xmmc = Util.null2String( request.getParameter( "xmmc" ) );//项目名称
    String gysmc = Util.null2String( request.getParameter( "gysmc" ) );//供应商名称
    JSONObject jsonData = new JSONObject();
    boolean flag = false;
    String sql = "select xygmbs from formtable_main_694 where id=?";
    rs.executeQuery( sql, xmmc );
    rs.next();
    String xygmbs = Util.null2String( rs.getString( 1 ) );//是否需要购买标书
    if ("0".equals( xygmbs )) {
        String sql1 = "select decode(t2.currentnodetype,3,0,1) as zt\n" +
                "from formtable_main_756 t1 left join workflow_requestbase t2 on t1.requestid=t2.requestid " +
                "where t1.zblx=? and gysmc=?";
        rs1.executeQuery( sql1, xmmc, gysmc );
        rs1.next();
        String lczt = Util.null2String( rs1.getString( 1 ) );
        flag = "0".equals( lczt ) ? true : false;
    }
    jsonData.put( "flag", flag );
    out.print( jsonData.toJSONString() );
    bb.writeLog( "getsfgmbsData_Ajax=" + jsonData.toJSONString() );
%>


